//
//  CCDChooseButtonView.m
//  operativeSide
//
//  Created by 王春程 on 16/5/18.
//  Copyright © 2016年 com.caocaod.www. All rights reserved.
//

#import "CCDChooseButtonView.h"
#import "CCDChooseButtonTableView.h"
@interface CCDChooseButtonView()
@property (strong, nonatomic)               UIView *backView;
@property (strong, nonatomic)               CCDChooseButtonTableView *tableView;

@end
@implementation CCDChooseButtonView

- (instancetype)initWithFrame:(CGRect)frame {
    if(self = [super initWithFrame:frame]) {
        _backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        _backView.layer.cornerRadius = 15;
        _backView.layer.masksToBounds = YES;
        _backView.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.backView];
        
        _tableView = [[CCDChooseButtonTableView alloc] initWithFrame:CGRectMake(10, 10, frame.size.width -20 , frame.size.height - 20) style:UITableViewStylePlain];
        [self addSubview:self.tableView];
        
    }
    return self;
}

- (void)setDataArr:(NSArray *)dataArr {
    _dataArr = dataArr;
    _tableView.dataArr = self.dataArr;
    [self.tableView reloadData];
}

@end
